#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include"WorkerManager.h"
using namespace std;

#include "worker.h"
#include "employee.h" 
#include "manager.h"
#include "Boss.h"

int main()
{
	//Worker* worker = NULL;
	//worker = new Employee(1, "张三", 1);
	//worker->showInfo();
	//delete worker;

	//worker = new Manager(2, "李四", 2);
	//worker->showInfo();
	//delete worker;

	//worker = new Boss(3, "王五", 3);
	//worker->showInfo();
	//delete worker;


	WorkerManager wm;
	int input = 0;
	while (1)
	{
		wm.show_Menu();
		cout << "请输入您的选择: " << endl;
		cin >> input;

		switch (input)
		{
		case 0:	//退出系统
		{
			wm.exitSystem();
			break;
		}
		case 1:	//增加职工
		{
			wm.Add_Emp();
			break;
		}
		case 2:	//显示职工
		{
			wm.Show_Emp();
			break;
		}
		case 3:	//删除职工
		{
			wm.Del_Emp();
			break;
		}
		case 4:	//修改职工
		{
			wm.Mod_Emp();
			break;
		}
		case 5:	//查找职工
		{
			wm.Find_Emp();
			break;
		}
		case 6:	//排序职工
		{
			wm.Sort_Emp();
			break;
		}
		case 7:	//清空文档
		{
			wm.Clear_File();
			break;
		}
		default:
			cout << "输入错误。" << endl;
			system("pause");
			system("cls");
			break;
		}
	}
	system("pause");
	return 0;
}